/*
 * @(#)JwiSynset.java	1.0 08/01/07
 *
 * Copyright 2007 Fabio Gasparetti. All rights reserved.
 */

package org.tabularium.text.nlp.wordnet.jwi;

import org.tabularium.text.nlp.wordnet.Synset;

import edu.mit.jwi.item.ISynsetID;

/**
 * 
 * @author Fabio Gasparetti
 * @version 1.0, 08/01/07
 */
public class JwiSynset extends Synset {
	String gloss = null;
	int pos = -1;
	ISynsetID jwiSynsetID = null;
	
	public int getPOS() {
		return pos;
	}

	public String getId() {
		return Long.toString(jwiSynsetID.getOffset());
	}
	
	public String getGloss() {
		return gloss;
	}	
	
	public int compareTo(Object o) {
		if (o == this)
			return 0;
		JwiSynset s = (JwiSynset)o;
		return (int)(jwiSynsetID.getOffset() - s.jwiSynsetID.getOffset());
	}

	public String toString() {
		return "offset:"+jwiSynsetID.getOffset()+" pos:"+org.tabularium.text.nlp.wordnet.PartOfSpeech.toString(pos)+" gloss:"+gloss;
	}

}
